<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="170px">
      <el-form-item label="录取单位代码" prop="admissionUnitCode">
        <el-input
          v-model="queryParams.admissionUnitCode"
          placeholder="请输入录取单位代码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取单位名称" prop="admissionUnitName">
        <el-input
          v-model="queryParams.admissionUnitName"
          placeholder="请输入录取单位名称"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取专业代码" prop="admissionMajorCode">
        <el-input
          v-model="queryParams.admissionMajorCode"
          placeholder="请输入录取专业代码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取专业名称" prop="admissionMajorName">
        <el-input
          v-model="queryParams.admissionMajorName"
          placeholder="请输入录取专业名称"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取学院码" prop="admissionCollegeCode">
        <el-input
          v-model="queryParams.admissionCollegeCode"
          placeholder="请输入录取学院码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学院名称" prop="collegeName">
        <el-input
          v-model="queryParams.collegeName"
          placeholder="请输入学院名称"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取研究方向代码" prop="admissionResearchDirectionCode">
        <el-input
          v-model="queryParams.admissionResearchDirectionCode"
          placeholder="请输入录取研究方向代码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取研究方向名称" prop="admissionResearchDirectionName">
        <el-input
          v-model="queryParams.admissionResearchDirectionName"
          placeholder="请输入录取研究方向名称"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取博导姓名" prop="admissionSupervisorName">
        <el-input
          v-model="queryParams.admissionSupervisorName"
          placeholder="请输入录取博导姓名"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取博导编号" prop="admissionSupervisorId">
        <el-input
          v-model="queryParams.admissionSupervisorId"
          placeholder="请输入录取博导编号"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取博导属性" prop="admissionSupervisorAttribute">
        <el-input
          v-model="queryParams.admissionSupervisorAttribute"
          placeholder="请输入录取博导属性"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="姓名" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入姓名"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学号" prop="studentId">
        <el-input
          v-model="queryParams.studentId"
          placeholder="请输入学号"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="考生档案所在单位" prop="candidateArchiveUnit">
        <el-input
          v-model="queryParams.candidateArchiveUnit"
          placeholder="请输入考生档案所在单位"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="联系方式" prop="contactInfo">
        <el-input
          v-model="queryParams.contactInfo"
          placeholder="请输入联系方式"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="考生编号" prop="candidateNumber">
        <el-input
          v-model="queryParams.candidateNumber"
          placeholder="请输入考生编号"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="身份证号" prop="idNumber">
        <el-input
          v-model="queryParams.idNumber"
          placeholder="请输入身份证号"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="出生地码" prop="birthPlaceCode">
        <el-input
          v-model="queryParams.birthPlaceCode"
          placeholder="请输入出生地码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="籍贯代码" prop="nativePlaceCode">
        <el-input
          v-model="queryParams.nativePlaceCode"
          placeholder="请输入籍贯代码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="出生日期" prop="dateOfBirth">
        <el-input
          v-model="queryParams.dateOfBirth"
          placeholder="请输入出生日期"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="民族码" prop="ethnicityCode">
        <el-input
          v-model="queryParams.ethnicityCode"
          placeholder="请输入民族码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="性别码" prop="genderCode">
        <el-input
          v-model="queryParams.genderCode"
          placeholder="请输入性别码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="婚姻状况码" prop="maritalStatusCode">
        <el-input
          v-model="queryParams.maritalStatusCode"
          placeholder="请输入婚姻状况码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="政治面貌码" prop="politicalStatusCode">
        <el-input
          v-model="queryParams.politicalStatusCode"
          placeholder="请输入政治面貌码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
<!--      <el-form-item label="获得学士学位单位码" prop="bachelorDegreeUnitCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.bachelorDegreeUnitCode"-->
<!--          placeholder="请输入获得学士学位单位码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获学士学位的单位名称" prop="bachelorDegreeUnitName">-->
<!--        <el-input-->
<!--          v-model="queryParams.bachelorDegreeUnitName"-->
<!--          placeholder="请输入获学士学位的单位名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获学士学位专业代码" prop="bachelorDegreeMajorCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.bachelorDegreeMajorCode"-->
<!--          placeholder="请输入获学士学位专业代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获学士学位专业名称" prop="bachelorDegreeMajorName">-->
<!--        <el-input-->
<!--          v-model="queryParams.bachelorDegreeMajorName"-->
<!--          placeholder="请输入获学士学位专业名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获学士学位年月" prop="bachelorDegreeDate">-->
<!--        <el-input-->
<!--          v-model="queryParams.bachelorDegreeDate"-->
<!--          placeholder="请输入获学士学位年月"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="学士学位证书编号" prop="bachelorDegreeCertificateNumber">-->
<!--        <el-input-->
<!--          v-model="queryParams.bachelorDegreeCertificateNumber"-->
<!--          placeholder="请输入学士学位证书编号"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="本科毕业单位代码" prop="undergraduateGraduationUnitCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.undergraduateGraduationUnitCode"-->
<!--          placeholder="请输入本科毕业单位代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="本科毕业单位名称" prop="undergraduateGraduationUnitName">-->
<!--        <el-input-->
<!--          v-model="queryParams.undergraduateGraduationUnitName"-->
<!--          placeholder="请输入本科毕业单位名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="本科毕业专业代码" prop="undergraduateGraduationMajorCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.undergraduateGraduationMajorCode"-->
<!--          placeholder="请输入本科毕业专业代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="本科毕业专业名称" prop="undergraduateGraduationMajorName">-->
<!--        <el-input-->
<!--          v-model="queryParams.undergraduateGraduationMajorName"-->
<!--          placeholder="请输入本科毕业专业名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="本科毕业年月" prop="undergraduateGraduationDate">-->
<!--        <el-input-->
<!--          v-model="queryParams.undergraduateGraduationDate"-->
<!--          placeholder="请输入本科毕业年月"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="本科毕业证书编号" prop="undergraduateGraduationCertificateNumber">-->
<!--        <el-input-->
<!--          v-model="queryParams.undergraduateGraduationCertificateNumber"-->
<!--          placeholder="请输入本科毕业证书编号"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="取得本科学历的学习形式" prop="undergraduateEducationForm">-->
<!--        <el-input-->
<!--          v-model="queryParams.undergraduateEducationForm"-->
<!--          placeholder="请输入取得本科学历的学习形式"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获硕士学位的单位代码" prop="masterDegreeUnitCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterDegreeUnitCode"-->
<!--          placeholder="请输入获硕士学位的单位代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获硕士学位的单位名称" prop="masterDegreeUnitName">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterDegreeUnitName"-->
<!--          placeholder="请输入获硕士学位的单位名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获硕士学位专业代码" prop="masterDegreeMajorCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterDegreeMajorCode"-->
<!--          placeholder="请输入获硕士学位专业代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获硕士学位专业名称" prop="masterDegreeMajorName">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterDegreeMajorName"-->
<!--          placeholder="请输入获硕士学位专业名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获硕士学位年月" prop="masterDegreeDate">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterDegreeDate"-->
<!--          placeholder="请输入获硕士学位年月"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="硕士学位证书编号" prop="masterDegreeCertificateNumber">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterDegreeCertificateNumber"-->
<!--          placeholder="请输入硕士学位证书编号"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="获硕士学位方式" prop="masterDegreeObtainmentMethod">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterDegreeObtainmentMethod"-->
<!--          placeholder="请输入获硕士学位方式"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="硕士毕业单位代码" prop="masterGraduationUnitCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterGraduationUnitCode"-->
<!--          placeholder="请输入硕士毕业单位代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="硕士毕业单位名称" prop="masterGraduationUnitName">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterGraduationUnitName"-->
<!--          placeholder="请输入硕士毕业单位名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="硕士毕业专业代码" prop="masterGraduationMajorCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterGraduationMajorCode"-->
<!--          placeholder="请输入硕士毕业专业代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="硕士毕业专业名称" prop="masterGraduationMajorName">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterGraduationMajorName"-->
<!--          placeholder="请输入硕士毕业专业名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="硕士毕业年月" prop="masterGraduationDate">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterGraduationDate"-->
<!--          placeholder="请输入硕士毕业年月"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="硕士毕业证书编号" prop="masterGraduationCertificateNumber">-->
<!--        <el-input-->
<!--          v-model="queryParams.masterGraduationCertificateNumber"-->
<!--          placeholder="请输入硕士毕业证书编号"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
      <el-form-item label="最后学位码" prop="lastDegreeCode">
        <el-input
          v-model="queryParams.lastDegreeCode"
          placeholder="请输入最后学位码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最后学历码" prop="lastEducationCode">
        <el-input
          v-model="queryParams.lastEducationCode"
          placeholder="请输入最后学历码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="在校生注册学号" prop="currentStudentRegistrationNumber">
        <el-input
          v-model="queryParams.currentStudentRegistrationNumber"
          placeholder="请输入在校生注册学号"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="考生来源码" prop="candidateSourceCode">
        <el-input
          v-model="queryParams.candidateSourceCode"
          placeholder="请输入考生来源码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
<!--      <el-form-item label="考试方式码" prop="examMethodCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.examMethodCode"-->
<!--          placeholder="请输入考试方式码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
      <el-form-item label="录取类别码" prop="admissionCategoryCode">
        <el-input
          v-model="queryParams.admissionCategoryCode"
          placeholder="请输入录取类别码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="现役军人码" prop="activeMilitaryCode">
        <el-input
          v-model="queryParams.activeMilitaryCode"
          placeholder="请输入现役军人码"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
<!--      <el-form-item label="外国语成绩" prop="foreignLanguageScore">-->
<!--        <el-input-->
<!--          v-model="queryParams.foreignLanguageScore"-->
<!--          placeholder="请输入外国语成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="业务课1成绩" prop="professionalCourse1Score">-->
<!--        <el-input-->
<!--          v-model="queryParams.professionalCourse1Score"-->
<!--          placeholder="请输入业务课1成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="业务课2成绩" prop="professionalCourse2Score">-->
<!--        <el-input-->
<!--          v-model="queryParams.professionalCourse2Score"-->
<!--          placeholder="请输入业务课2成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="政治理论成绩" prop="politicalTheoryScore">-->
<!--        <el-input-->
<!--          v-model="queryParams.politicalTheoryScore"-->
<!--          placeholder="请输入政治理论成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="复试成绩" prop="reexaminationScore">-->
<!--        <el-input-->
<!--          v-model="queryParams.reexaminationScore"-->
<!--          placeholder="请输入复试成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="加试科目1成绩" prop="supplementaryExam1Score">-->
<!--        <el-input-->
<!--          v-model="queryParams.supplementaryExam1Score"-->
<!--          placeholder="请输入加试科目1成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="加试科目2成绩" prop="supplementaryExam2Score">-->
<!--        <el-input-->
<!--          v-model="queryParams.supplementaryExam2Score"-->
<!--          placeholder="请输入加试科目2成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="定向就业单位所在地码" prop="targetEmploymentUnitLocationCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.targetEmploymentUnitLocationCode"-->
<!--          placeholder="请输入定向就业单位所在地码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="定向就业单位" prop="targetEmploymentUnit">-->
<!--        <el-input-->
<!--          v-model="queryParams.targetEmploymentUnit"-->
<!--          placeholder="请输入定向就业单位"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="专项计划" prop="specialProgram">-->
<!--        <el-input-->
<!--          v-model="queryParams.specialProgram"-->
<!--          placeholder="请输入专项计划"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="专项计划2" prop="specialProgram2">-->
<!--        <el-input-->
<!--          v-model="queryParams.specialProgram2"-->
<!--          placeholder="请输入专项计划2"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="招生单位所在省市码" prop="admissionUnitProvinceCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.admissionUnitProvinceCode"-->
<!--          placeholder="请输入招生单位所在省市码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="备用信息" prop="reservedInfo">-->
<!--        <el-input-->
<!--          v-model="queryParams.reservedInfo"-->
<!--          placeholder="请输入备用信息"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="联合培养单位代码" prop="jointTrainingUnitCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.jointTrainingUnitCode"-->
<!--          placeholder="请输入联合培养单位代码"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="联合培养单位名称" prop="jointTrainingUnitName">-->
<!--        <el-input-->
<!--          v-model="queryParams.jointTrainingUnitName"-->
<!--          placeholder="请输入联合培养单位名称"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
      <el-form-item label="学制" prop="schoolSystem">
        <el-input
          v-model="queryParams.schoolSystem"
          placeholder="请输入学制"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="录取学习方式" prop="admissionStudyMethod">
        <el-input
          v-model="queryParams.admissionStudyMethod"
          placeholder="请输入录取学习方式"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
<!--      <el-form-item label="是否申请考核" prop="applicationAssessment">-->
<!--        <el-input-->
<!--          v-model="queryParams.applicationAssessment"-->
<!--          placeholder="请输入是否申请考核"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="初试总分" prop="preliminaryTotalScore">-->
<!--        <el-input-->
<!--          v-model="queryParams.preliminaryTotalScore"-->
<!--          placeholder="请输入初试总分"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="总成绩" prop="totalScore">-->
<!--        <el-input-->
<!--          v-model="queryParams.totalScore"-->
<!--          placeholder="请输入总成绩"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="总成绩折算办法" prop="totalScoreConversionMethod">-->
<!--        <el-input-->
<!--          v-model="queryParams.totalScoreConversionMethod"-->
<!--          placeholder="请输入总成绩折算办法"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="批量导入批次号" prop="batchImportNo">-->
<!--        <el-input-->
<!--          v-model="queryParams.batchImportNo"-->
<!--          placeholder="请输入批量导入批次号"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="批量导入状态校验结果" prop="batchImportVerificationResult">-->
<!--        <el-input-->
<!--          v-model="queryParams.batchImportVerificationResult"-->
<!--          placeholder="请输入批量导入状态校验结果"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="导入操作员" prop="importOperator">-->
<!--        <el-input-->
<!--          v-model="queryParams.importOperator"-->
<!--          placeholder="请输入导入操作员"-->
<!--          clearable-->
<!--          @keyup.enter="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="导入时间" prop="importTime">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.importTime"-->
<!--          type="date"-->
<!--          value-format="YYYY-MM-DD"-->
<!--          placeholder="请选择导入时间">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
      <el-form-item>
        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="Plus"
          @click="handleAdd"
          v-hasPermi="['student:bslq:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="Edit"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['student:bslq:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="Delete"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['student:bslq:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="Download"
          @click="handleExport"
          v-hasPermi="['student:bslq:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
            type="info"
            icon="el-icon-upload2"
            size="mini"
            @click="handleImport"
        >导入</el-button>
      </el-col>

      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="bslqList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
<!--      <el-table-column label="唯一标识" align="center" prop="id" />-->
      <el-table-column label="录取单位代码" align="center" prop="admissionUnitCode" />
      <el-table-column label="录取单位名称" align="center" prop="admissionUnitName" />
      <el-table-column label="录取专业代码" align="center" prop="admissionMajorCode" />
      <el-table-column label="录取专业名称" align="center" prop="admissionMajorName" />
      <el-table-column label="录取学院码" align="center" prop="admissionCollegeCode" />
      <el-table-column label="学院名称" align="center" prop="collegeName" />
      <el-table-column label="录取研究方向代码" align="center" prop="admissionResearchDirectionCode" />
      <el-table-column label="录取研究方向名称" align="center" prop="admissionResearchDirectionName" />
      <el-table-column label="录取博导姓名" align="center" prop="admissionSupervisorName" />
      <el-table-column label="录取博导编号" align="center" prop="admissionSupervisorId" />
      <el-table-column label="录取博导属性" align="center" prop="admissionSupervisorAttribute" />
      <el-table-column label="姓名" align="center" prop="name" />
      <el-table-column label="学号" align="center" prop="studentId" />
      <el-table-column label="考生档案所在单位" align="center" prop="candidateArchiveUnit" />
      <el-table-column label="联系方式" align="center" prop="contactInfo" />
      <el-table-column label="考生编号" align="center" prop="candidateNumber" />
      <el-table-column label="证件类型" align="center" prop="idType" />
      <el-table-column label="身份证号" align="center" prop="idNumber" />
      <el-table-column label="出生地码" align="center" prop="birthPlaceCode" />
      <el-table-column label="籍贯代码" align="center" prop="nativePlaceCode" />
      <el-table-column label="出生日期" align="center" prop="dateOfBirth" />
      <el-table-column label="民族码" align="center" prop="ethnicityCode" />
      <el-table-column label="性别码" align="center" prop="genderCode" />
      <el-table-column label="婚姻状况码" align="center" prop="maritalStatusCode" />
      <el-table-column label="政治面貌码" align="center" prop="politicalStatusCode" />
      <el-table-column label="获得学士学位单位码" align="center" prop="bachelorDegreeUnitCode" />
      <el-table-column label="获学士学位的单位名称" align="center" prop="bachelorDegreeUnitName" />
      <el-table-column label="获学士学位专业代码" align="center" prop="bachelorDegreeMajorCode" />
      <el-table-column label="获学士学位专业名称" align="center" prop="bachelorDegreeMajorName" />
      <el-table-column label="获学士学位年月" align="center" prop="bachelorDegreeDate" />
      <el-table-column label="学士学位证书编号" align="center" prop="bachelorDegreeCertificateNumber" />
      <el-table-column label="本科毕业单位代码" align="center" prop="undergraduateGraduationUnitCode" />
      <el-table-column label="本科毕业单位名称" align="center" prop="undergraduateGraduationUnitName" />
      <el-table-column label="本科毕业专业代码" align="center" prop="undergraduateGraduationMajorCode" />
      <el-table-column label="本科毕业专业名称" align="center" prop="undergraduateGraduationMajorName" />
      <el-table-column label="本科毕业年月" align="center" prop="undergraduateGraduationDate" />
      <el-table-column label="本科毕业证书编号" align="center" prop="undergraduateGraduationCertificateNumber" />
      <el-table-column label="取得本科学历的学习形式" align="center" prop="undergraduateEducationForm" />
      <el-table-column label="获硕士学位的单位代码" align="center" prop="masterDegreeUnitCode" />
      <el-table-column label="获硕士学位的单位名称" align="center" prop="masterDegreeUnitName" />
      <el-table-column label="获硕士学位专业代码" align="center" prop="masterDegreeMajorCode" />
      <el-table-column label="获硕士学位专业名称" align="center" prop="masterDegreeMajorName" />
      <el-table-column label="获硕士学位年月" align="center" prop="masterDegreeDate" />
      <el-table-column label="硕士学位证书编号" align="center" prop="masterDegreeCertificateNumber" />
      <el-table-column label="获硕士学位方式" align="center" prop="masterDegreeObtainmentMethod" />
      <el-table-column label="硕士毕业单位代码" align="center" prop="masterGraduationUnitCode" />
      <el-table-column label="硕士毕业单位名称" align="center" prop="masterGraduationUnitName" />
      <el-table-column label="硕士毕业专业代码" align="center" prop="masterGraduationMajorCode" />
      <el-table-column label="硕士毕业专业名称" align="center" prop="masterGraduationMajorName" />
      <el-table-column label="硕士毕业年月" align="center" prop="masterGraduationDate" />
      <el-table-column label="硕士毕业证书编号" align="center" prop="masterGraduationCertificateNumber" />
      <el-table-column label="最后学位码" align="center" prop="lastDegreeCode" />
      <el-table-column label="最后学历码" align="center" prop="lastEducationCode" />
      <el-table-column label="在校生注册学号" align="center" prop="currentStudentRegistrationNumber" />
      <el-table-column label="考生来源码" align="center" prop="candidateSourceCode" />
      <el-table-column label="考试方式码" align="center" prop="examMethodCode" />
      <el-table-column label="录取类别码" align="center" prop="admissionCategoryCode" />
      <el-table-column label="现役军人码" align="center" prop="activeMilitaryCode" />
      <el-table-column label="外国语成绩" align="center" prop="foreignLanguageScore" />
      <el-table-column label="业务课1成绩" align="center" prop="professionalCourse1Score" />
      <el-table-column label="业务课2成绩" align="center" prop="professionalCourse2Score" />
      <el-table-column label="政治理论成绩" align="center" prop="politicalTheoryScore" />
      <el-table-column label="复试成绩" align="center" prop="reexaminationScore" />
      <el-table-column label="加试科目1成绩" align="center" prop="supplementaryExam1Score" />
      <el-table-column label="加试科目2成绩" align="center" prop="supplementaryExam2Score" />
      <el-table-column label="定向就业单位所在地码" align="center" prop="targetEmploymentUnitLocationCode" />
      <el-table-column label="定向就业单位" align="center" prop="targetEmploymentUnit" />
      <el-table-column label="专项计划" align="center" prop="specialProgram" />
      <el-table-column label="专项计划2" align="center" prop="specialProgram2" />
      <el-table-column label="招生单位所在省市码" align="center" prop="admissionUnitProvinceCode" />
      <el-table-column label="备用信息" align="center" prop="reservedInfo" />
      <el-table-column label="联合培养单位代码" align="center" prop="jointTrainingUnitCode" />
      <el-table-column label="联合培养单位名称" align="center" prop="jointTrainingUnitName" />
      <el-table-column label="学制" align="center" prop="schoolSystem" />
      <el-table-column label="录取学习方式" align="center" prop="admissionStudyMethod" />
      <el-table-column label="是否申请考核" align="center" prop="applicationAssessment" />
      <el-table-column label="初试总分" align="center" prop="preliminaryTotalScore" />
      <el-table-column label="总成绩" align="center" prop="totalScore" />
      <el-table-column label="总成绩折算办法" align="center" prop="totalScoreConversionMethod" />
      <el-table-column label="批量导入批次号" align="center" prop="batchImportNo" />
      <el-table-column label="导入状态" align="center" prop="importStatus" />
      <el-table-column label="批量导入状态校验结果" align="center" prop="batchImportVerificationResult" />
      <el-table-column label="校验提示信息" align="center" prop="verificationPromptInfo" />
      <el-table-column label="导入操作员" align="center" prop="importOperator" />
      <el-table-column label="导入时间" align="center" prop="importTime" width="180">
        <template #default="scope">
          <span>{{ parseTime(scope.row.importTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template #default="scope">
          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['student:bslq:edit']">修改</el-button>
          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['student:bslq:remove']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      v-model:page="queryParams.pageNum"
      v-model:limit="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- 用户导入对话框 -->
    <el-dialog :title="upload.title" v-model="upload.open" width="400px">
      <el-upload
          ref="uploadRef"
          :limit="1"
          accept=".xlsx, .xls"
          :headers="upload.headers"
          :action="upload.url + '?updateSupport=' + upload.updateSupport"
          :disabled="upload.isUploading"
          :on-progress="handleFileUploadProgress"
          :on-success="handleFileSuccess"
          :auto-upload="false"
          drag
      >
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">
          将文件拖到此处，或
          <em>点击上传</em>
        </div>
        <div class="el-upload__tip" slot="tip">
          <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
        </div>
        <div class="el-upload__tip" style="color:red" slot="tip">提示：仅允许导入“xls”或“xlsx”格式文件！</div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm">确 定</el-button>
        <el-button @click="upload.open = false">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 失败学生列表对话框 -->
    <el-dialog
        :title="failedStudentsDialog.title"
        v-model="failedStudentsDialog.visible"
        width="600px"
    >
      <el-table :data="failedStudentsDialog.students" max-height="400">
        <el-table-column prop="name" label="学生姓名" width="120"></el-table-column>
        <el-table-column prop="candidateNumber" label="考生编号" width="150"></el-table-column>
        <el-table-column prop="reason" label="失败原因"></el-table-column>
      </el-table>
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="closeFailedStudentsDialog">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 添加或修改博士录取信息对话框 -->
    <!-- 添加或修改博士录取信息对话框 -->
    <!-- 添加或修改博士录取信息对话框 -->
    <el-dialog :title="title" v-model="open" width="1600px" append-to-body>
      <el-form ref="bslqRef" :model="form" :rules="rules" label-width="190px">

        <!-- 1. 个人信息模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">个人信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="姓名" prop="name">
              <el-input v-model="form.name" placeholder="请输入姓名" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="学号" prop="studentId">
              <el-input v-model="form.studentId" placeholder="请输入学号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="身份证号" prop="idNumber">
              <el-input v-model="form.idNumber" placeholder="请输入身份证号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出生日期" prop="dateOfBirth">
              <el-input v-model="form.dateOfBirth" placeholder="请输入出生日期" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="民族码" prop="ethnicityCode">
              <el-input v-model="form.ethnicityCode" placeholder="请输入民族码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="性别码" prop="genderCode">
              <el-input v-model="form.genderCode" placeholder="请输入性别码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="婚姻状况码" prop="maritalStatusCode">
              <el-input v-model="form.maritalStatusCode" placeholder="请输入婚姻状况码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="政治面貌码" prop="politicalStatusCode">
              <el-input v-model="form.politicalStatusCode" placeholder="请输入政治面貌码" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 2. 地区信息模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">地区信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出生地码" prop="birthPlaceCode">
              <el-input v-model="form.birthPlaceCode" placeholder="请输入出生地码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="籍贯代码" prop="nativePlaceCode">
              <el-input v-model="form.nativePlaceCode" placeholder="请输入籍贯代码" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 3. 联系方式模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">联系方式</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系方式" prop="contactInfo">
              <el-input v-model="form.contactInfo" placeholder="请输入联系方式" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 4. 证件信息模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">证件信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="考生编号" prop="candidateNumber">
              <el-input v-model="form.candidateNumber" placeholder="请输入考生编号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="考生档案所在单位" prop="candidateArchiveUnit">
              <el-input v-model="form.candidateArchiveUnit" placeholder="请输入考生档案所在单位" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5. 教育背景模块 -->
        <!-- 5.1 学习信息子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 学习信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取单位代码" prop="admissionUnitCode">
              <el-input v-model="form.admissionUnitCode" placeholder="请输入录取单位代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取单位名称" prop="admissionUnitName">
              <el-input v-model="form.admissionUnitName" placeholder="请输入录取单位名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取专业代码" prop="admissionMajorCode">
              <el-input v-model="form.admissionMajorCode" placeholder="请输入录取专业代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取专业名称" prop="admissionMajorName">
              <el-input v-model="form.admissionMajorName" placeholder="请输入录取专业名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取学院码" prop="admissionCollegeCode">
              <el-input v-model="form.admissionCollegeCode" placeholder="请输入录取学院码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="学院名称" prop="collegeName">
              <el-input v-model="form.collegeName" placeholder="请输入学院名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取研究方向代码" prop="admissionResearchDirectionCode">
              <el-input v-model="form.admissionResearchDirectionCode" placeholder="请输入录取研究方向代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取研究方向名称" prop="admissionResearchDirectionName">
              <el-input v-model="form.admissionResearchDirectionName" placeholder="请输入录取研究方向名称" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5.2 导师信息子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 导师信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取博导姓名" prop="admissionSupervisorName">
              <el-input v-model="form.admissionSupervisorName" placeholder="请输入录取博导姓名" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取博导编号" prop="admissionSupervisorId">
              <el-input v-model="form.admissionSupervisorId" placeholder="请输入录取博导编号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取博导属性" prop="admissionSupervisorAttribute">
              <el-input v-model="form.admissionSupervisorAttribute" placeholder="请输入录取博导属性" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5.3 学制与入学信息子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 学制与入学信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="学制" prop="schoolSystem">
              <el-input v-model="form.schoolSystem" placeholder="请输入学制" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5.4 学习方式与计划子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 学习方式与计划</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取学习方式" prop="admissionStudyMethod">
              <el-input v-model="form.admissionStudyMethod" placeholder="请输入录取学习方式" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="专项计划" prop="specialProgram">
              <el-input v-model="form.specialProgram" placeholder="请输入专项计划" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="专项计划2" prop="specialProgram2">
              <el-input v-model="form.specialProgram2" placeholder="请输入专项计划2" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5.5 学生类型与身份子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 学生类型与身份</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="最后学位码" prop="lastDegreeCode">
              <el-input v-model="form.lastDegreeCode" placeholder="请输入最后学位码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="最后学历码" prop="lastEducationCode">
              <el-input v-model="form.lastEducationCode" placeholder="请输入最后学历码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="在校生注册学号" prop="currentStudentRegistrationNumber">
              <el-input v-model="form.currentStudentRegistrationNumber" placeholder="请输入在校生注册学号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="考生来源码" prop="candidateSourceCode">
              <el-input v-model="form.candidateSourceCode" placeholder="请输入考生来源码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="考试方式码" prop="examMethodCode">
              <el-input v-model="form.examMethodCode" placeholder="请输入考试方式码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录取类别码" prop="admissionCategoryCode">
              <el-input v-model="form.admissionCategoryCode" placeholder="请输入录取类别码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="现役军人码" prop="activeMilitaryCode">
              <el-input v-model="form.activeMilitaryCode" placeholder="请输入现役军人码" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5.6 毕业单位与档案信息子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 毕业单位与档案信息</div>
          </el-col>
          <!-- 学士学位信息 -->
          <el-col :span="24" class="sub-module-title">学士学位信息</el-col>
          <el-col :span="12">
            <el-form-item label="获得学士学位单位码" prop="bachelorDegreeUnitCode">
              <el-input v-model="form.bachelorDegreeUnitCode" placeholder="请输入获得学士学位单位码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获学士学位的单位名称" prop="bachelorDegreeUnitName">
              <el-input v-model="form.bachelorDegreeUnitName" placeholder="请输入获学士学位的单位名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获学士学位专业代码" prop="bachelorDegreeMajorCode">
              <el-input v-model="form.bachelorDegreeMajorCode" placeholder="请输入获学士学位专业代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获学士学位专业名称" prop="bachelorDegreeMajorName">
              <el-input v-model="form.bachelorDegreeMajorName" placeholder="请输入获学士学位专业名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获学士学位年月" prop="bachelorDegreeDate">
              <el-input v-model="form.bachelorDegreeDate" placeholder="请输入获学士学位年月" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="学士学位证书编号" prop="bachelorDegreeCertificateNumber">
              <el-input v-model="form.bachelorDegreeCertificateNumber" placeholder="请输入学士学位证书编号" />
            </el-form-item>
          </el-col>

          <!-- 本科毕业信息 -->
          <el-col :span="24" class="sub-module-title">本科毕业信息</el-col>
          <el-col :span="12">
            <el-form-item label="本科毕业单位代码" prop="undergraduateGraduationUnitCode">
              <el-input v-model="form.undergraduateGraduationUnitCode" placeholder="请输入本科毕业单位代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本科毕业单位名称" prop="undergraduateGraduationUnitName">
              <el-input v-model="form.undergraduateGraduationUnitName" placeholder="请输入本科毕业单位名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本科毕业专业代码" prop="undergraduateGraduationMajorCode">
              <el-input v-model="form.undergraduateGraduationMajorCode" placeholder="请输入本科毕业专业代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本科毕业专业名称" prop="undergraduateGraduationMajorName">
              <el-input v-model="form.undergraduateGraduationMajorName" placeholder="请输入本科毕业专业名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本科毕业年月" prop="undergraduateGraduationDate">
              <el-input v-model="form.undergraduateGraduationDate" placeholder="请输入本科毕业年月" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本科毕业证书编号" prop="undergraduateGraduationCertificateNumber">
              <el-input v-model="form.undergraduateGraduationCertificateNumber" placeholder="请输入本科毕业证书编号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="取得本科学历的学习形式" prop="undergraduateEducationForm">
              <el-input v-model="form.undergraduateEducationForm" placeholder="请输入取得本科学历的学习形式" />
            </el-form-item>
          </el-col>

          <!-- 硕士学位信息 -->
          <el-col :span="24" class="sub-module-title">硕士学位信息</el-col>
          <el-col :span="12">
            <el-form-item label="获硕士学位的单位代码" prop="masterDegreeUnitCode">
              <el-input v-model="form.masterDegreeUnitCode" placeholder="请输入获硕士学位的单位代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获硕士学位的单位名称" prop="masterDegreeUnitName">
              <el-input v-model="form.masterDegreeUnitName" placeholder="请输入获硕士学位的单位名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获硕士学位专业代码" prop="masterDegreeMajorCode">
              <el-input v-model="form.masterDegreeMajorCode" placeholder="请输入获硕士学位专业代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获硕士学位专业名称" prop="masterDegreeMajorName">
              <el-input v-model="form.masterDegreeMajorName" placeholder="请输入获硕士学位专业名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获硕士学位年月" prop="masterDegreeDate">
              <el-input v-model="form.masterDegreeDate" placeholder="请输入获硕士学位年月" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="硕士学位证书编号" prop="masterDegreeCertificateNumber">
              <el-input v-model="form.masterDegreeCertificateNumber" placeholder="请输入硕士学位证书编号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="获硕士学位方式" prop="masterDegreeObtainmentMethod">
              <el-input v-model="form.masterDegreeObtainmentMethod" placeholder="请输入获硕士学位方式" />
            </el-form-item>
          </el-col>

          <!-- 硕士毕业信息 -->
          <el-col :span="24" class="sub-module-title">硕士毕业信息</el-col>
          <el-col :span="12">
            <el-form-item label="硕士毕业单位代码" prop="masterGraduationUnitCode">
              <el-input v-model="form.masterGraduationUnitCode" placeholder="请输入硕士毕业单位代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="硕士毕业单位名称" prop="masterGraduationUnitName">
              <el-input v-model="form.masterGraduationUnitName" placeholder="请输入硕士毕业单位名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="硕士毕业专业代码" prop="masterGraduationMajorCode">
              <el-input v-model="form.masterGraduationMajorCode" placeholder="请输入硕士毕业专业代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="硕士毕业专业名称" prop="masterGraduationMajorName">
              <el-input v-model="form.masterGraduationMajorName" placeholder="请输入硕士毕业专业名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="硕士毕业年月" prop="masterGraduationDate">
              <el-input v-model="form.masterGraduationDate" placeholder="请输入硕士毕业年月" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="硕士毕业证书编号" prop="masterGraduationCertificateNumber">
              <el-input v-model="form.masterGraduationCertificateNumber" placeholder="请输入硕士毕业证书编号" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5.7 定向与录取信息子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 定向与录取信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="定向就业单位所在地码" prop="targetEmploymentUnitLocationCode">
              <el-input v-model="form.targetEmploymentUnitLocationCode" placeholder="请输入定向就业单位所在地码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="定向就业单位" prop="targetEmploymentUnit">
              <el-input v-model="form.targetEmploymentUnit" placeholder="请输入定向就业单位" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="招生单位所在省市码" prop="admissionUnitProvinceCode">
              <el-input v-model="form.admissionUnitProvinceCode" placeholder="请输入招生单位所在省市码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联合培养单位代码" prop="jointTrainingUnitCode">
              <el-input v-model="form.jointTrainingUnitCode" placeholder="请输入联合培养单位代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联合培养单位名称" prop="jointTrainingUnitName">
              <el-input v-model="form.jointTrainingUnitName" placeholder="请输入联合培养单位名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否申请考核" prop="applicationAssessment">
              <el-input v-model="form.applicationAssessment" placeholder="请输入是否申请考核" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="初试总分" prop="preliminaryTotalScore">
              <el-input v-model="form.preliminaryTotalScore" placeholder="请输入初试总分" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="总成绩" prop="totalScore">
              <el-input v-model="form.totalScore" placeholder="请输入总成绩" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="总成绩折算办法" prop="totalScoreConversionMethod">
              <el-input v-model="form.totalScoreConversionMethod" placeholder="请输入总成绩折算办法" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 5.8 其他教育信息子模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">教育背景 - 其他教育信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="备用信息" prop="reservedInfo">
              <el-input v-model="form.reservedInfo" placeholder="请输入备用信息" />
            </el-form-item>
          </el-col>
        </el-row>

        <!-- 6. 其他信息模块 -->
        <el-row class="form-module">
          <el-col :span="24">
            <div class="module-title">其他信息</div>
          </el-col>
          <el-col :span="12">
            <el-form-item label="导入时间" prop="importTime">
              <el-date-picker clearable
                              v-model="form.importTime"
                              type="date"
                              value-format="YYYY-MM-DD"
                              placeholder="请选择导入时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="导入操作员" prop="importOperator">
              <el-input v-model="form.importOperator" placeholder="请输入导入操作员" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="校验提示信息" prop="verificationPromptInfo">
              <el-input v-model="form.verificationPromptInfo" type="textarea" placeholder="请输入内容" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="批量导入批次号" prop="batchImportNo">
              <el-input v-model="form.batchImportNo" placeholder="请输入批量导入批次号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="批量导入状态校验结果" prop="batchImportVerificationResult">
              <el-input v-model="form.batchImportVerificationResult" placeholder="请输入批量导入状态校验结果" />
            </el-form-item>
          </el-col>
        </el-row>

      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>


  </div>
</template>

<script setup name="Bslq">
import { listBslq, getBslq, delBslq, addBslq, updateBslq } from "@/api/student/bslq"
import { getToken } from "@/utils/auth";
const { proxy } = getCurrentInstance()

const bslqList = ref([])
const open = ref(false)
const loading = ref(true)
const showSearch = ref(true)
const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const total = ref(0)
const title = ref("")

const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    admissionUnitCode: null,
    admissionUnitName: null,
    admissionMajorCode: null,
    admissionMajorName: null,
    admissionCollegeCode: null,
    collegeName: null,
    admissionResearchDirectionCode: null,
    admissionResearchDirectionName: null,
    admissionSupervisorName: null,
    admissionSupervisorId: null,
    admissionSupervisorAttribute: null,
    name: null,
    studentId: null,
    candidateArchiveUnit: null,
    contactInfo: null,
    candidateNumber: null,
    idType: null,
    idNumber: null,
    birthPlaceCode: null,
    nativePlaceCode: null,
    dateOfBirth: null,
    ethnicityCode: null,
    genderCode: null,
    maritalStatusCode: null,
    politicalStatusCode: null,
    bachelorDegreeUnitCode: null,
    bachelorDegreeUnitName: null,
    bachelorDegreeMajorCode: null,
    bachelorDegreeMajorName: null,
    bachelorDegreeDate: null,
    bachelorDegreeCertificateNumber: null,
    undergraduateGraduationUnitCode: null,
    undergraduateGraduationUnitName: null,
    undergraduateGraduationMajorCode: null,
    undergraduateGraduationMajorName: null,
    undergraduateGraduationDate: null,
    undergraduateGraduationCertificateNumber: null,
    undergraduateEducationForm: null,
    masterDegreeUnitCode: null,
    masterDegreeUnitName: null,
    masterDegreeMajorCode: null,
    masterDegreeMajorName: null,
    masterDegreeDate: null,
    masterDegreeCertificateNumber: null,
    masterDegreeObtainmentMethod: null,
    masterGraduationUnitCode: null,
    masterGraduationUnitName: null,
    masterGraduationMajorCode: null,
    masterGraduationMajorName: null,
    masterGraduationDate: null,
    masterGraduationCertificateNumber: null,
    lastDegreeCode: null,
    lastEducationCode: null,
    currentStudentRegistrationNumber: null,
    candidateSourceCode: null,
    examMethodCode: null,
    admissionCategoryCode: null,
    activeMilitaryCode: null,
    foreignLanguageScore: null,
    professionalCourse1Score: null,
    professionalCourse2Score: null,
    politicalTheoryScore: null,
    reexaminationScore: null,
    supplementaryExam1Score: null,
    supplementaryExam2Score: null,
    targetEmploymentUnitLocationCode: null,
    targetEmploymentUnit: null,
    specialProgram: null,
    specialProgram2: null,
    admissionUnitProvinceCode: null,
    reservedInfo: null,
    jointTrainingUnitCode: null,
    jointTrainingUnitName: null,
    schoolSystem: null,
    admissionStudyMethod: null,
    applicationAssessment: null,
    preliminaryTotalScore: null,
    totalScore: null,
    totalScoreConversionMethod: null,
    batchImportNo: null,
    importStatus: null,
    batchImportVerificationResult: null,
    verificationPromptInfo: null,
    importOperator: null,
    importTime: null
  },
  rules: {
    admissionUnitCode: [
      { required: true, message: "录取单位代码不能为空", trigger: "blur" }
    ],
    admissionUnitName: [
      { required: true, message: "录取单位名称不能为空", trigger: "blur" }
    ],
    admissionMajorCode: [
      { required: true, message: "录取专业代码不能为空", trigger: "blur" }
    ],
    admissionMajorName: [
      { required: true, message: "录取专业名称不能为空", trigger: "blur" }
    ],
    admissionCollegeCode: [
      { required: true, message: "录取学院码不能为空", trigger: "blur" }
    ],
    collegeName: [
      { required: true, message: "学院名称不能为空", trigger: "blur" }
    ],
    admissionResearchDirectionCode: [
      { required: true, message: "录取研究方向代码不能为空", trigger: "blur" }
    ],
    admissionResearchDirectionName: [
      { required: true, message: "录取研究方向名称不能为空", trigger: "blur" }
    ],
    admissionSupervisorName: [
      { required: true, message: "录取博导姓名不能为空", trigger: "blur" }
    ],
    admissionSupervisorId: [
      { required: true, message: "录取博导编号不能为空", trigger: "blur" }
    ],
    admissionSupervisorAttribute: [
      { required: true, message: "录取博导属性不能为空", trigger: "blur" }
    ],
    name: [
      { required: true, message: "姓名不能为空", trigger: "blur" }
    ],
    candidateArchiveUnit: [
      { required: true, message: "考生档案所在单位不能为空", trigger: "blur" }
    ],
    contactInfo: [
      { required: true, message: "联系方式不能为空", trigger: "blur" }
    ],
    candidateNumber: [
      { required: true, message: "考生编号不能为空", trigger: "blur" }
    ],
    idType: [
      { required: true, message: "证件类型不能为空", trigger: "change" }
    ],
    idNumber: [
      { required: true, message: "身份证号不能为空", trigger: "blur" }
    ],
    birthPlaceCode: [
      { required: true, message: "出生地码不能为空", trigger: "blur" }
    ],
    nativePlaceCode: [
      { required: true, message: "籍贯代码不能为空", trigger: "blur" }
    ],
    dateOfBirth: [
      { required: true, message: "出生日期不能为空", trigger: "blur" }
    ],
    ethnicityCode: [
      { required: true, message: "民族码不能为空", trigger: "blur" }
    ],
    genderCode: [
      { required: true, message: "性别码不能为空", trigger: "blur" }
    ],
    maritalStatusCode: [
      { required: true, message: "婚姻状况码不能为空", trigger: "blur" }
    ],
    politicalStatusCode: [
      { required: true, message: "政治面貌码不能为空", trigger: "blur" }
    ],
    bachelorDegreeUnitCode: [
      { required: true, message: "获得学士学位单位码不能为空", trigger: "blur" }
    ],
    bachelorDegreeUnitName: [
      { required: true, message: "获学士学位的单位名称不能为空", trigger: "blur" }
    ],
    bachelorDegreeMajorCode: [
      { required: true, message: "获学士学位专业代码不能为空", trigger: "blur" }
    ],
    bachelorDegreeMajorName: [
      { required: true, message: "获学士学位专业名称不能为空", trigger: "blur" }
    ],
    bachelorDegreeDate: [
      { required: true, message: "获学士学位年月不能为空", trigger: "blur" }
    ],
    bachelorDegreeCertificateNumber: [
      { required: true, message: "学士学位证书编号不能为空", trigger: "blur" }
    ],
    undergraduateEducationForm: [
      { required: true, message: "取得本科学历的学习形式不能为空", trigger: "blur" }
    ],
    masterDegreeObtainmentMethod: [
      { required: true, message: "获硕士学位方式不能为空", trigger: "blur" }
    ],
    lastDegreeCode: [
      { required: true, message: "最后学位码不能为空", trigger: "blur" }
    ],
    lastEducationCode: [
      { required: true, message: "最后学历码不能为空", trigger: "blur" }
    ],
    candidateSourceCode: [
      { required: true, message: "考生来源码不能为空", trigger: "blur" }
    ],
    examMethodCode: [
      { required: true, message: "考试方式码不能为空", trigger: "blur" }
    ],
    admissionCategoryCode: [
      { required: true, message: "录取类别码不能为空", trigger: "blur" }
    ],
    activeMilitaryCode: [
      { required: true, message: "现役军人码不能为空", trigger: "blur" }
    ],
    foreignLanguageScore: [
      { required: true, message: "外国语成绩不能为空", trigger: "blur" }
    ],
    professionalCourse1Score: [
      { required: true, message: "业务课1成绩不能为空", trigger: "blur" }
    ],
    professionalCourse2Score: [
      { required: true, message: "业务课2成绩不能为空", trigger: "blur" }
    ],
    politicalTheoryScore: [
      { required: true, message: "政治理论成绩不能为空", trigger: "blur" }
    ],
    reexaminationScore: [
      { required: true, message: "复试成绩不能为空", trigger: "blur" }
    ],
    supplementaryExam1Score: [
      { required: true, message: "加试科目1成绩不能为空", trigger: "blur" }
    ],
    supplementaryExam2Score: [
      { required: true, message: "加试科目2成绩不能为空", trigger: "blur" }
    ],
    targetEmploymentUnitLocationCode: [
      { required: true, message: "定向就业单位所在地码不能为空", trigger: "blur" }
    ],
    targetEmploymentUnit: [
      { required: true, message: "定向就业单位不能为空", trigger: "blur" }
    ],
    specialProgram: [
      { required: true, message: "专项计划不能为空", trigger: "blur" }
    ],
    admissionUnitProvinceCode: [
      { required: true, message: "招生单位所在省市码不能为空", trigger: "blur" }
    ],
    schoolSystem: [
      { required: true, message: "学制不能为空", trigger: "blur" }
    ],
    admissionStudyMethod: [
      { required: true, message: "录取学习方式不能为空", trigger: "blur" }
    ],
    applicationAssessment: [
      { required: true, message: "是否申请考核不能为空", trigger: "blur" }
    ],
    preliminaryTotalScore: [
      { required: true, message: "初试总分不能为空", trigger: "blur" }
    ],
    totalScore: [
      { required: true, message: "总成绩不能为空", trigger: "blur" }
    ],
    totalScoreConversionMethod: [
      { required: true, message: "总成绩折算办法不能为空", trigger: "blur" }
    ],
    importStatus: [
      { required: true, message: "导入状态不能为空", trigger: "change" }
    ],
    batchImportVerificationResult: [
      { required: true, message: "批量导入状态校验结果不能为空", trigger: "blur" }
    ],
    importOperator: [
      { required: true, message: "导入操作员不能为空", trigger: "blur" }
    ],
    importTime: [
      { required: true, message: "导入时间不能为空", trigger: "blur" }
    ]
  }
})

// 添加失败学生列表对话框相关数据
const failedStudentsDialog = ref({
  visible: false,
  title: "导入失败学生列表",
  students: []
});

const { queryParams, form, rules } = toRefs(data)
const upload = ref({
  // 是否显示弹出层（用户导入）
  open: false,
  // 弹出层标题（用户导入）
  title: "",
  // 是否禁用上传
  isUploading: false,
  // 是否更新已经存在的用户数据
  updateSupport: 0,
  // 设置上传的请求头部
  headers: { Authorization: "Bearer " + getToken() },
  // 上传的地址
  url: import.meta.env.VITE_APP_BASE_API + "/student/bslq/importData"
});

// 显示失败学生列表的函数
function showFailedStudents(students) {
  failedStudentsDialog.value.students = students;
  failedStudentsDialog.value.visible = true;
}

// 关闭失败学生列表对话框
function closeFailedStudentsDialog() {
  failedStudentsDialog.value.visible = false;
  failedStudentsDialog.value.students = [];
}

/** 查询博士录取信息列表 */
function getList() {
  loading.value = true
  listBslq(queryParams.value).then(response => {
    bslqList.value = response.rows
    total.value = response.total
    loading.value = false
  })
}

// 取消按钮
function cancel() {
  open.value = false
  reset()
}

// 表单重置
function reset() {
  form.value = {
    id: null,
    admissionUnitCode: null,
    admissionUnitName: null,
    admissionMajorCode: null,
    admissionMajorName: null,
    admissionCollegeCode: null,
    collegeName: null,
    admissionResearchDirectionCode: null,
    admissionResearchDirectionName: null,
    admissionSupervisorName: null,
    admissionSupervisorId: null,
    admissionSupervisorAttribute: null,
    name: null,
    studentId: null,
    candidateArchiveUnit: null,
    contactInfo: null,
    candidateNumber: null,
    idType: null,
    idNumber: null,
    birthPlaceCode: null,
    nativePlaceCode: null,
    dateOfBirth: null,
    ethnicityCode: null,
    genderCode: null,
    maritalStatusCode: null,
    politicalStatusCode: null,
    bachelorDegreeUnitCode: null,
    bachelorDegreeUnitName: null,
    bachelorDegreeMajorCode: null,
    bachelorDegreeMajorName: null,
    bachelorDegreeDate: null,
    bachelorDegreeCertificateNumber: null,
    undergraduateGraduationUnitCode: null,
    undergraduateGraduationUnitName: null,
    undergraduateGraduationMajorCode: null,
    undergraduateGraduationMajorName: null,
    undergraduateGraduationDate: null,
    undergraduateGraduationCertificateNumber: null,
    undergraduateEducationForm: null,
    masterDegreeUnitCode: null,
    masterDegreeUnitName: null,
    masterDegreeMajorCode: null,
    masterDegreeMajorName: null,
    masterDegreeDate: null,
    masterDegreeCertificateNumber: null,
    masterDegreeObtainmentMethod: null,
    masterGraduationUnitCode: null,
    masterGraduationUnitName: null,
    masterGraduationMajorCode: null,
    masterGraduationMajorName: null,
    masterGraduationDate: null,
    masterGraduationCertificateNumber: null,
    lastDegreeCode: null,
    lastEducationCode: null,
    currentStudentRegistrationNumber: null,
    candidateSourceCode: null,
    examMethodCode: null,
    admissionCategoryCode: null,
    activeMilitaryCode: null,
    foreignLanguageScore: null,
    professionalCourse1Score: null,
    professionalCourse2Score: null,
    politicalTheoryScore: null,
    reexaminationScore: null,
    supplementaryExam1Score: null,
    supplementaryExam2Score: null,
    targetEmploymentUnitLocationCode: null,
    targetEmploymentUnit: null,
    specialProgram: null,
    specialProgram2: null,
    admissionUnitProvinceCode: null,
    reservedInfo: null,
    jointTrainingUnitCode: null,
    jointTrainingUnitName: null,
    schoolSystem: null,
    admissionStudyMethod: null,
    applicationAssessment: null,
    preliminaryTotalScore: null,
    totalScore: null,
    totalScoreConversionMethod: null,
    batchImportNo: null,
    importStatus: null,
    batchImportVerificationResult: null,
    verificationPromptInfo: null,
    importOperator: null,
    importTime: null
  }
  proxy.resetForm("bslqRef")
}

/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1
  getList()
}

/** 重置按钮操作 */
function resetQuery() {
  proxy.resetForm("queryRef")
  handleQuery()
}

// 多选框选中数据
function handleSelectionChange(selection) {
  ids.value = selection.map(item => item.id)
  single.value = selection.length != 1
  multiple.value = !selection.length
}

/** 新增按钮操作 */
function handleAdd() {
  reset()
  open.value = true
  title.value = "添加博士录取信息"
}

/** 修改按钮操作 */
function handleUpdate(row) {
  reset()
  const _id = row.id || ids.value
  getBslq(_id).then(response => {
    form.value = response.data
    open.value = true
    title.value = "修改博士录取信息"
  })
}

/** 提交按钮 */
function submitForm() {
  proxy.$refs["bslqRef"].validate(valid => {
    if (valid) {
      if (form.value.id != null) {
        updateBslq(form.value).then(response => {
          proxy.$modal.msgSuccess("修改成功")
          open.value = false
          getList()
        })
      } else {
        addBslq(form.value).then(response => {
          proxy.$modal.msgSuccess("新增成功")
          open.value = false
          getList()
        })
      }
    }
  })
}

/** 删除按钮操作 */
function handleDelete(row) {
  const _ids = row.id || ids.value
  proxy.$modal.confirm('是否确认删除博士录取信息编号为"' + _ids + '"的数据项？').then(function() {
    return delBslq(_ids)
  }).then(() => {
    getList()
    proxy.$modal.msgSuccess("删除成功")
  }).catch(() => {})
}

/** 导出按钮操作 */
function handleExport() {
  proxy.download('student/bslq/export', {
    ...queryParams.value
  }, `bslq_${new Date().getTime()}.xlsx`)
}
/** 1. 导入按钮操作（修正 this.upload） */
function handleImport() {
  // 原错误：this.upload.title → 修正为 upload.value.title
  upload.value.title = "博士录取信息导入"; // 建议改标题为具体业务名称，更清晰
  upload.value.open = true;
  console.log(upload.value); // 打开导入弹窗
}

/** 2. 下载模板操作（修正 this.download） */
function importTemplate() {
  // 原错误：this.download → 修正为 proxy.download（RuoYi 框架方法挂载在实例上）
  proxy.download('student/bslq/importTemplate', {},
      `博士录取信息导入模板_${new Date().getTime()}.xlsx`);
}

/** 3. 文件上传中处理（修正 this.upload） */
function handleFileUploadProgress(event, file, fileList) {
  // 原错误：this.upload.isUploading → 修正为 upload.value.isUploading
  upload.value.isUploading = true; // 上传中禁用按钮
}

// 从错误信息中提取失败学生名单
function extractFailedStudentsFromError(errorMsg) {
  // 这里可以根据实际的错误信息格式来解析失败学生
  // 示例：假设错误信息包含类似 "账号 导入失败：学生姓名(考生编号)"
  const failedStudents = [];

  // 匹配失败学生信息的正则表达式
  const regex = /(\d+)、账号\s+导入失败：(.+?)\s*###/g;
  let match;

  while ((match = regex.exec(errorMsg)) !== null) {
    const index = match[1];
    const errorDetail = match[2];

    // 从错误详情中提取学生信息（根据实际格式调整）
    // 这里只是一个示例，需要根据实际返回的错误信息格式进行调整
    failedStudents.push({
      name: `学生${index}`,
      candidateNumber: `未知`,
      reason: errorDetail.substring(0, 50) + (errorDetail.length > 50 ? '...' : '')
    });
  }

  return failedStudents;
}

/** 4. 文件上传成功处理 */
function handleFileSuccess(response, file, fileList) {
  // 1. 关闭弹窗 + 恢复上传状态
  upload.value.open = false;
  upload.value.isUploading = false;

  // 2. 清空上传文件列表
  proxy.$refs.uploadRef.clearFiles();

  // 3. 处理导入结果
  if (response.code === 500) {
    // 错误响应
    let errorMsg = "导入失败";
    if (response.msg && response.msg.includes('Duplicate entry')) {
      errorMsg = "存在重复的考生号，该账户已存在，请检查数据后重试";
    } else if (response.msg) {
      errorMsg = response.msg;
    }

    // 尝试从错误信息中提取失败学生
    const failedStudents = extractFailedStudentsFromError(errorMsg);
    if (failedStudents.length > 0) {
      showFailedStudents(failedStudents);
      proxy.$alert(`导入失败，共${failedStudents.length}条记录导入失败`, "导入结果", {
        type: "error"
      });
    } else {
      proxy.$alert(errorMsg, "导入结果", {
        type: "error",
        dangerouslyUseHTMLString: true
      });
    }
  } else {
    // 成功响应
    if (response.failedStudents && response.failedStudents.length > 0) {
      // 有失败的学生，显示失败列表
      showFailedStudents(response.failedStudents);
      proxy.$alert(`导入完成，成功导入${response.successCount || 0}条记录，${response.failedStudents.length}条记录导入失败`,
          "导入结果", {
            type: "warning"
          });
    } else {
      // 全部成功或普通成功消息
      proxy.$alert(response.msg || "导入完成", "导入结果", {
        dangerouslyUseHTMLString: response.msg && response.msg.includes('<br/>')
      });
    }
  }

  // 4. 重新查询列表
  getList();
}



/** 5. 提交上传文件（修正 this.$refs） */
function submitFileForm() {
  // 添加错误处理
  proxy.$refs.uploadRef.submit(); // 触发文件上传

  // 监听上传错误事件
  proxy.$refs.uploadRef.$on('on-error', (err, file, fileList) => {
    upload.value.isUploading = false;
    // 检查是否是重复记录错误
    if (err && err.message && err.message.includes('Duplicate entry')) {
      proxy.$alert("导入失败：存在重复的考生号，该账户已存在，请检查数据后重试", "导入结果", {
        type: "error"
      });
    } else {
      proxy.$alert("文件上传失败，请稍后重试", "导入结果", {
        type: "error"
      });
    }
  });
}


getList()
</script>

<style scoped>
/* 主模块标题样式：突出显示 */
.module-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
  border-left: 3px solid #409eff;
  padding-left: 10px;
}

/* 子模块标题样式：辅助区分 */
.sub-module-title {
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0;
  color: #666;
  padding-left: 10px;
}

/* 模块容器样式：控制间距和底部分割线 */
.form-module {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #eee;
}
.form-module:last-child {
  border-bottom: none; /* 最后一个模块去掉底部线 */
}
</style>